#ifndef USER_H
#define USER_H

#include<string>
using namespace std;

// User表的ORM类, 业务层修改和查询只是 在 该类上操作,不会涉及到 数据库层的sql
class User{
public:
    User(int id=-1,string name="", string pwd = "",string state = "offline")
    {
        this->id = id;
        this->name = name;
        this->password = pwd;
        this->state = state;
    }

    void setId(int id) { this->id = id;}
    void setName(string name){this->name = name;}
    void setPwd(string pwd){this->password = pwd;}
    void setState(string state) {this->state = state;}

    int getId() { return this->id;}
    string getName(){ return name;}
    string getPwd() { return password;}
    string getState() { return state;}    


protected:
    int id; 
    string name;
    string password;
    string state;
};

#endif